let arr = [1,2,3,4];
// 1. for arr2
// let arr2 = arr; // 浅拷贝 引用式赋值
// let arr2 = arr.slice(0); // 拷贝
let arr2 = arr.concat();
arr2[1] = 0;
console.log(arr,arr2)

var arr3 = [{name:'weifeng'},{"name":"boy"}];
var arr4 = [].concat(arr3);
arr4[1].name = 'llaia';
console.log(arr3,arr4)